<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CrateShopAttributeKeyTable extends Migration
{
    public function up()
    {
        //类别属性KEY
        Schema::create('shop_attribute_key', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('category_id')->comment('分类ID');
            $table->string('attribute_name',50)->comment('属性名');
            $table->tinyInteger('sort')->default(50)->comment('排序');
            $table->timestamps();
        });
    }
    public function down()
    {
        Schema::dropIfExists('shop_attribute_key');
    }
}
